<!DOCTYPE html>
<html>
<head>
	<title>新增地址</title>
	<meta charset="utf-8">
    <script type="text/javascript">
        if (/Android (\d+\.\d+)/.test(navigator.userAgent)) {
            var version = parseFloat(RegExp.$1);
            if (version > 2.3) {
                var phoneScale = parseInt(window.screen.width) / 750;
                document.write('<meta name="viewport" content="width=750,minimum-scale=' + phoneScale + ',maximum-scale=' + phoneScale + ',target-densitydpi=device-dpi">');
            } else {
                document.write('<meta name="viewport" content="width=750,target-densitydpi=device-dpi">');
            }
        } else {
            document.write('<meta name="viewport" content="width=750,user-scalable=no,target-densitydpi=device-dpi,minimal-ui">');
        }
    </script>
    <link rel="stylesheet" type="text/css" href="../css/index.css">
    <link rel="stylesheet" type="text/css" href="../css/common.css">
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/jquery.citys.js"></script>
</head>
<body>
<div class="wrap">
	<section class="newAddress">
		<div class="addressInfo">
			<div class="userName">
				<p>
				<span>姓名</span>
				<input type="text">123</input>
				</p>
			</div>
			<div class="userTel">
				<p>
				<span>联系电话</span>
				<input type="tel"  name="usrtel"></input>
				</p>
			</div>
			<div class="userAddress">
				<p>
				<span>所在地址</span>
					<span id="demo2" class="citys">
		                    <select name="province" style="width:190px;"></select>
		                    <select name="city" style="width:190px;"></select>
		                    <select name="area" style="width:190px;"></select>
		            </span>				
				<input type="hidden" name="address" id="address" style="padding-left: 3%">
				</p>

			</div>
			<div class="userAddress01">
				<p>
				<span>详细地址</span>
				<input type="text" placeholder="不超过30个字" ></input>
				</p>
			</div>
		</div>
</section>
<section class="addressSet">
		<div class="default clearfix">
		    <span class="defaultAddress">设为默认地址</span>
		    <span class="defaultBtn">
			<label>
	        <input type="checkbox" class="checkboxBtn" name="chencked" value="设为默认地址" checked>
	        <span class="check"></span>
	        </label>
	        </span>
		</div>
</section>
</div>
	<footer class="subtn">
	<div class="subList">
		<a href="#" class="borderRight">取消</a>
		<a href="#" class="borderRight pink">确定</a>
	</div>
	</footer>
</body>
<script type="text/javascript">
$('#demo2').citys({
	dataUrl:"../js/citys.json",
    required:false,
    nodata:'disabled',
    onChange:function(data){
    	console.log(data['city'])
      $('#address').val(data['province']+' '+data['city']+' '+data['area']);
    }
});	
</script>
</html>